<template>
    <view class="container">
		<!-- #ifdef H5 -->
		<swiper class="swiper" circular>
			<swiper-item>
				<image src="@/common/static/banner.png" mode="heightFix" style="width: 100%;"></image>
			</swiper-item>
		</swiper>
		<!-- #endif -->
        <view class="grid">
            <view class="grid-li" @click="gridClick(item)" v-for="(item, index) in gridList" :key="index">
                <image class="grid_img" :src="item.icon" mode="aspectFill"></image>
                <text class="grid-text">{{ item.label }}</text>
            </view>
        </view>
		<u-divider text="广州市震海影业有限公司提供技术支持"></u-divider>
		<div class="footer">
			<a href="https://beian.miit.gov.cn/">粤ICP备2022156692号-4</a>
		</div>
    </view>
</template>

<script>
import utils from '@/sub_pages/movie/utils/index.js';
export default {
    data() {
        return {
            gridList: [
                {
                    label: '我的订单',
                    icon: require('@/sub_pages/movie/static/image/icon/icon_1.png'),
                    type: 'nav',
                    url: '/sub_pages/movie/order-list/order-list',
                },
                {
                    label: '特惠购票',
                    type: 'nav',
                    icon: require('@/sub_pages/movie/static/image/icon/icon_2.png'),
                    url: '/sub_pages/movie/index/index',
                },
            ],
        };
    },
    onLoad(option) {
        // 初始化一些 购票模块的 数据
        getApp().globalData.subcontracting_movie = {
            selectCity: {}, // 选中城市
            isNetWork: true, // 检查是否有网络
            isGps: true, // 是否启用gps定位功能
            isAutoSeat: false, // 是否开启自动换做功能
            selectSeat: null, // 当前选中座位信息
            beforeSeats: null, // 当前选中电影场次信息
            confirmOrder: null, // 确定订单信息
            dicts: [], // 存储数据字典
            maxCoupon: {}, // 最大优惠额度优惠券
            $utils: utils,
        };
        getApp().globalData.subcontracting_movie.$utils.getAllCitys();
		if (option.appId) {
			uni.setStorageSync("appId", option.appId);
		}
    },
    methods: {
        gridClick(e) {
            uni.navigateTo({ url: e.url });
        },
    },
};
</script>

<style lang="scss" scoped>
.grid {
    padding: 30rpx;
    @include flexCenter;
    &-li {
        flex: 1;
        @include flexCenterCenter;
        flex-direction: column;
    }
    .grid-text {
        @include font(28rpx, #666666);
    }
    .grid_img {
        width: 110rpx;
        height: 110rpx;
    }
}
.container {
	position: relative;
	height: calc(100vh - 44px);
	.footer {
		width: 100%;
		position: absolute;
		bottom: 0;
		text-align: center;
		padding-bottom: 20rpx;
		a {
			color: #9c9c9c;
			font-size: 26rpx;
			text-decoration: none;
		}
	}
}
@media screen and (min-width: 768px) {
	.swiper {
		display: none;
	}
}
</style>
